package com.ruoyi.course.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 学期关键日历事件对象 term_calendar_events
 * 
 * @author chenxl
 * @date 2025-08-29
 */
public class TermCalendarEvents extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键，使用字符串ID */
    @JsonIgnore
    private String id;

    /** 关联的学期ID（字符串类型） */
//    @JsonIgnore
    @Excel(name = "关联的学期ID", readConverterExp = "字=符串类型")
    private String termId;

    /** 事件类型编码：1=选课开始, 2=选课截止, 3=成绩录入开始, 4=成绩截止等 */
    @Excel(name = "事件类型编码：1=选课开始, 2=选课截止, 3=成绩录入开始, 4=成绩截止等")
    private Long eventType;

    /** 事件显示名称，如 选课开始、成绩提交截止 */
    @Excel(name = "事件显示名称，如 选课开始、成绩提交截止")
    private String eventName;

    /** 事件开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "事件开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 事件结束时间，可为空 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "事件结束时间，可为空", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 持续类型：0=单时间点, 1=时间段 */
    @Excel(name = "持续类型：0=单时间点, 1=时间段")
    private Long durationType;

    /** 是否启用 */
    @Excel(name = "是否启用")
    private Integer isActive;

    /** 是否为系统预设事件 */
    @Excel(name = "是否为系统预设事件")
    private Integer isSystem;

    /** 事件详细说明 */
    @Excel(name = "事件详细说明")
    private String description;

    /** 优先级（1-10） */
    @Excel(name = "优先级", readConverterExp = "1=-10")
    private Long priority;

    /** 提前多少天通知（如 -7 表示提前7天） */
    @Excel(name = "提前多少天通知", readConverterExp = "如=,-=7,表=示提前7天")
    private Long notifyBeforeDays;

    /** 创建人ID（字符串） */
    @JsonIgnore
    @Excel(name = "创建人ID", readConverterExp = "字=符串")
    private String createdBy;

    /** 最后修改人ID */
    @JsonIgnore
    @Excel(name = "最后修改人ID")
    private String updatedBy;

    /** 创建时间 */
    @JsonIgnore
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonIgnore
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setTermId(String termId) 
    {
        this.termId = termId;
    }

    public String getTermId() 
    {
        return termId;
    }

    public void setEventType(Long eventType) 
    {
        this.eventType = eventType;
    }

    public Long getEventType() 
    {
        return eventType;
    }

    public void setEventName(String eventName) 
    {
        this.eventName = eventName;
    }

    public String getEventName() 
    {
        return eventName;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setDurationType(Long durationType) 
    {
        this.durationType = durationType;
    }

    public Long getDurationType() 
    {
        return durationType;
    }

    public void setIsActive(Integer isActive) 
    {
        this.isActive = isActive;
    }

    public Integer getIsActive() 
    {
        return isActive;
    }

    public void setIsSystem(Integer isSystem) 
    {
        this.isSystem = isSystem;
    }

    public Integer getIsSystem() 
    {
        return isSystem;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setPriority(Long priority) 
    {
        this.priority = priority;
    }

    public Long getPriority() 
    {
        return priority;
    }

    public void setNotifyBeforeDays(Long notifyBeforeDays) 
    {
        this.notifyBeforeDays = notifyBeforeDays;
    }

    public Long getNotifyBeforeDays() 
    {
        return notifyBeforeDays;
    }

    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }

    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("termId", getTermId())
            .append("eventType", getEventType())
            .append("eventName", getEventName())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("durationType", getDurationType())
            .append("isActive", getIsActive())
            .append("isSystem", getIsSystem())
            .append("description", getDescription())
            .append("priority", getPriority())
            .append("notifyBeforeDays", getNotifyBeforeDays())
            .append("createdBy", getCreatedBy())
            .append("updatedBy", getUpdatedBy())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
